package cc.htdf.gwc.datacompare.service.impl;

import cc.htdf.gwc.datacompare.repository.DateRepository;
import cc.htdf.gwc.datacompare.service.DateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by JT on 2017/10/11.
 */
@Service
public class DateServiceImpl implements DateService {

    @Autowired
    private DateRepository dateRepository;

    /**
     * 查询上一次对比的实况数据发布时间
     *
     * @return
     */
    @Override
    public String findLastCompareDate() {
        return dateRepository.findLastCompareDate();
    }

    /**
     * 更新上一次对比的实况数据发布时间
     *
     * @param date ：实况数据发布时间
     */
    @Override
    public void updateLastCompareDate(String date) {
        dateRepository.updateLastCompareDate(date);
    }
}
